<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>获取表单数据</title>
</head>
<body>
<!-- 第一种方式 -->
<form action="${pageContext.request.contextPath }/form.action" name="form1">
name<input type="text" name="name"/>
password<input type="password" name="password"/>
<input type="submit" value="登陆"/>
</form>
</body>
</html>